package cn.starlightsoftware.sherly.controller.admin.basic;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import cn.starlightsoftware.sherly.controller.admin.basic.vo.BasicDetailRespVO;
import cn.starlightsoftware.sherly.model.Result;
import cn.starlightsoftware.sherly.service.basic.BasicService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author 谷子毅
 */
@Validated
@Tag(name = "admin-基础功能")
@RestController
@RequestMapping("/system/basic")
public class BasicController {

    @Resource
    private BasicService basicService;

    @GetMapping("/detail")
    @Operation(summary = "登录详情")
    public Result<BasicDetailRespVO> detail() {
        return Result.success(basicService.detail());
    }

    @GetMapping("/heart-beat")
    @Operation(summary = "心跳检测")
    public Result<?> heartBeat() {
        return Result.success();
    }

}
